Latex how I add local file pdf path \bibliographystyle{natdin} - pdf

I have a latex file with bib text file. I have the problem that I would like to add on my literatur add my local pdf path so that when i have my pdf file I can open it direktly from my local hard drive.
Latex:
\bibliographystyle{natdin}
\bibliography{Literatur}
example in my file "Literatur.bib":
#article{myarticle,
author = {my autor},
year = {2016},
title = {my title},
url = {http://myarticle.org/myarticle.pdf},
urldate = {08.12.2016},
file = {...\\myfolder\\12341234.pdf:pdf}
}
What I get:
my autor, 2016, my title, http://myarticle.org/myarticle.pdf
What I want:
my autor, 2016, my title, http://myarticle.org/myarticle.pdf, 12341234.pdf

You can use the note field to hold an external href link, like so:
#article{myarticle,
author = {my autor},
year = {2016},
title = {my title},
url = {http://myarticle.org/myarticle.pdf},
urldate = {08.12.2016},
note = {\href{run:../myfolder/12341234.pdf}{12341234.pdf}},
}
Note the corrected path format. The result will be like this:

Related

azure runbook PowerShell script content is not importing in terraform properly in azure automation account

I have created azure automation account using terraform. I have save my existing runbook PowerShell script files in local. I have successfully uploaded all the script files at one time while creation of automation account with below code:
resource "azurerm_automation_runbook" "example" {
for_each = fileset("Azure_Runbooks/", "*")
name = split(".", each.key)[0]
location = var.location
resource_group_name = var.resource_group
automation_account_name = azurerm_automation_account.example.name
log_verbose = var.log_verbose
log_progress = var.log_progress
runbook_type = var.runbooktype
content = each.value
}
After running the terraform apply command, all the script files are uploading successfully to the automation account but the content of the PowerShell script is not getting uploaded. I have checked the runbooks in the automation account but there is not content inside the file. I am seeing only the name of the file.
Can some one please help me with above issue.
You assuming fileset(path, pattern) returns the contents of the file as each.value, but that is not the case. The each.value is just the file name.
You need something like:
resource "azurerm_automation_runbook" "example" {
for_each = fileset("Azure_Runbooks/", "*")
name = split(".", each.key)[0]
location = var.location
resource_group_name = var.resource_group
automation_account_name = azurerm_automation_account.example.name
log_verbose = var.log_verbose
log_progress = var.log_progress
runbook_type = var.runbooktype
content = file(format("%s%s", "Azure_Runbooks/", each.value)
}
I hope this helps.
I have fixed the issue with correct code:
resource "azurerm_automation_runbook" "example" {
for_each = fileset("Azure_Runbooks/", "*")
name = split(".", each.key)[0]
location = var.location
resource_group_name = var.resource_group
automation_account_name = azurerm_automation_account.example.name
log_verbose = var.log_verbose
log_progress = var.log_progress
runbook_type = var.runbooktype
content = file(format("%s%s" , "Azure_Runbooks/" , each.key))
}
Thanks #YoungGova for your help.

Google Drive List All Folders and Files [duplicate]

This question already has answers here:
List all files and folder in google drive
(2 answers)
Closed 2 years ago.
Hi I'm looking for a way to get a list for all my folders, sub folders and files from my google drive. I would like it to create a spreadsheet in my drive that outputs:
-All folders names, all sub folder names, all files names and there id (if not the id the url or both). Optional if it is possible output the description
Ive tried the code display on this post that works but it only gives me the file name and link in the parent folder only but I would like all mention information.
if someone knows the correct full code?
// replace your-folder below with the folder for which you want a listing
function listFolderContents() {
var foldername = 'your-folder';
var folderlisting = 'listing of folder ' + foldername;
var folders = DriveApp.getFoldersByName(foldername)
var folder = folders.next();
var contents = folder.getFiles();
var ss = SpreadsheetApp.create(folderlisting);
var sheet = ss.getActiveSheet();
sheet.appendRow( ['name', 'link'] );
var file;
var name;
var link;
var row;
while(contents.hasNext()) {
file = contents.next();
name = file.getName();
link = file.getUrl();
sheet.appendRow( [name, link] );
}
};
Execute this URI request which I generated from the Drive API explorer:
https://www.googleapis.com/drive/v3/files?fields=files%2CincompleteSearch%2Ckind%2CnextPageToken
It will return all your files and the its metada - complete info, which is found in File Resource properties.

alfresco - convert docx to pdf and create a new version

I' m trying to convert a docx document to pdf and store the newly created pdf file as a new version.
This is the test code:
var document = search.findNode("workspace://SpacesStore/30f334f3-d357-4ea6-a09f-09eab2da7488");
var folder = document.parent
var pdf = document.transformDocument('application/pdf');
pdf.name = "tranformed-" + pdf.name;
pdf.save();
document.name = "new-" + document.name + ".pdf";
document.mimetype = "application/pdf";
document.content = pdf.content;
document.save();
The document ends up empty.
Is this type of conversion possible with javaScript?
This Code create new pdf from docx and created pdf stored as version 1.0
var document = search.findNode("workspace://SpacesStore/30f334f3-d357-4ea6-a09f-09eab2da7488");
var folder = document.parent
var pdf = document.transformDocument('application/pdf');
pdf.name = "tranformed-" + pdf.name;
pdf.save();
Thanks for your support.
The problem was assigning the pdf content.
The following code seems to work only with plain text content:
document.content = pdf.content;
Paradoxically, the following is needed when assigning pdf content to a document.
document.properties.content.write(pdf.properties.content);
Thanks.

How to move generated PDF to a specific folder in Google Drive

Here is the jist of what I want this script to do.
User submits a form using Google Forms
Form Records to Google Sheet
Sheet replaces text and generate Google Document from Template
Template is copied
PDF is created from this template
PDF is emailed
PDF is moved to a specific folder in Google Drive.
I have all of those things to work except the last step. Can someone help us out here? We are using this for a school, and nobody in our (IT) department knows anything about scripts. Through Googling and searching I have come this far. The last step is to get the PDF to move to a specific folder.
Here is the current code:
// MacArthur High School
// Generic PLC Agenda Script
// Created 18 Jul 2014
// Author: Josh Patrick
// Decatur Public Schools #61
// Document Creation - replace docTemplate links with each template link on the PLC Drive.
var docTemplate = "1DSFCE6mFZib0ZTVOgVqPbLYaRwjS-XNsnsZn5RZewsE";
var docName = "PLC Agenda";
// Form Functions (labeled identifiers for Form)
function onFormSubmit(e) {
var TimeStamp = e.values [0]
var MeetingDate = e.values [1];
var MeetingTime = e.values [2];
var MeetingLocation = e.values [3];
var PLCFocus = e.values [4];
var PlannedActions = e.values [5];
var ResourcesNeeded = e.values [6];
var AssignedEmail = "jwpatrick#dps61.org";
// Get document template, copy it as a new temp doc, and save the Doc’s id
var copyId = DocsList.getFileById(docTemplate)
.makeCopy(docName+' for '+ MeetingDate)
.getId();
// Open the temporary document
var copyDoc = DocumentApp.openById(copyId);
// Get the document’s body section
var copyBody = copyDoc.getActiveSection();
// Replacing Text with Form Information
copyBody.replaceText('keyMeetingDate', MeetingDate);
copyBody.replaceText('keyMeetingTime', MeetingTime);
copyBody.replaceText('keyMeetingLocation', MeetingLocation);
copyBody.replaceText('keyPLCFocus' , PLCFocus);
copyBody.replaceText('keyPlannedActions' , PlannedActions);
copyBody.replaceText('keyResourcesNeeded' ResourcesNeeded);
// Copy Document and Save
copyDoc.saveAndClose();
// Generate PDF
var pdf = DocsList.getFileById(copyId).getAs("application/pdf");
// Email
var subject = "ELA PLC Agenda for " + MeetingDate ;
var body = "Attached is the PDF copy of the ELA PLC Agenda for " + MeetingDate;
MailApp.sendEmail(AssignedEmail, subject, body, {htmlBody: body, attachments: pdf});
// Delete Temporary Document
DocsList.getFileById(copyId).setTrashed(true);
}
**** Instead of deleting the temporary document, I want to move it to a specific file in Google Drive. I have looked up the scripts help, but I don't think I have done it correctly. I can get it to copydoc but I cannot get it to move to the right folder.
Any assistance is much appreciated.
addToFolder may fit your need.
developers.google.com/apps-script/reference/docs-list/file#addToFolder(Folder)

How to publish Pelican documents with a different file extension?

I do want to setup pelican in such way that it will allow me to compile static markdown files by keeping their location but changing the compiled file extensions on the destination.
Here is an example:
content/about.md --> output/about.html
content/foo/bar.md --> output/foo/bar.html
Inside config I tried these:
PAGE_URL = '{path}.html'
PAGE_SAVE_AS = '{path}.html'
ARTICLE_URL = '{path}.html'
ARTICLE_SAVE_AS = '{path}.html'
The problem is that the .md part is not removed and that {path} contains the entire path with the filename.
I know that I could use the {slug} and manually enter the slug inside bug that's not cool at all as it would require me to add a slug for each page.
You can try this in your pelican configuration:
FILENAME_METADATA = '(?P<slug>.*)' # use markdown file name as the slug meta
USE_FOLDER_AS_CATEGORY = True # use folder name as posts' category
ARTICLE_URL = '{category}/{slug}.html'
ARTICLE_SAVE_AS = ARTICLE_URL
PAGE_URL = '{slug}.html'
PAGE_SAVE_AS = PAGE_URL
CATEGORY_URL = '{slug}/index.html'
CATEGORY_SAVE_AS = CATEGORY_URL
For details about these variables, see http://docs.getpelican.com/en/3.1.1/settings.html