Shaare your links...
3341 links
L!NKS Retour au blog Login RSS Feed ATOM Feed Tag cloud Picture wall Daily
Links per page: 20 50 100
page 1 / 1
2 results for tags obsidian x
  • Exporting Canvas to HTML (and PDF) - Share & showcase - Obsidian Forum
    ctrl + maj + i : open developper console
    allow pasting

    // Get a copy of the canvas content element
    let view = app.workspace.activeLeaf.view;
    if (view.getViewType() !== "canvas") {
     throw new Error("The active view is not a canvas");
    }
    let content = view.contentEl.cloneNode(true);

    // Remove the canvas background dots
    content.querySelector(".canvas-background").remove();

    // Remove the canvas UI controls
    content.querySelector(".canvas-card-menu").remove();
    content.querySelector(".canvas-controls").remove();

    // Remove the canvas node labels (image filenames)
    content.querySelectorAll(".canvas-node-label").forEach((el) => el.remove());

    // Get all the CSS, except for print styles
    // https://developer.mozilla.org/en-US/docs/Web/API/StyleSheetList#get_all_css_rules_for_the_document_using_array_methods
    let allCSS = [...document.styleSheets]
     .map((styleSheet) =>
       [...styleSheet.cssRules]
         .map((rule) => rule.cssText)
         .filter((cssText) => !cssText.includes("@media print")) // No print styles
         .join("\n")
     )
     .join("\n");

    // Global regex matches app:// followed by any characters except /
    let pattern = /app:\/\/[^\/]*/g;

    // Generate HTML & CSS. Remove any app:// prefixes from URLs.
    let html = `
    <!DOCTYPE HTML>
    <html>
    <head>
    <style>
    ${allCSS}
    /* Use exact colors for card backgrounds and bullets */
    body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    </style>
    </head>
    <body class="${document.querySelector("body").className}">
    ${content.outerHTML}
    </body>
    </html>`.replaceAll(pattern, "");

    // Save html file
    let filename = "canvas-export.html";
    existingFile = app.vault.getAbstractFileByPath(filename);
    if (existingFile) {
     app.vault.delete(existingFile);
    }
    app.vault.create(filename, html);

    console.log("Open this file in your browser and print to PDF:");
    console.log(`${app.vault.adapter.basePath}/${filename}`);
    permalink -
    - https://forum.obsidian.md/t/exporting-canvas-to-html-and-pdf/60331
    obsidian
  • An Updated Academic Workflow: Zotero & Obsidian | by Alexandra Phelan | Medium
    ---
    category: literaturenote
    tags: {% if allTags %}{{allTags}}{% endif %}
    citekey: {{citekey}}
    status: unread
    dateread:
    ---

    > [!Cite]
    > {{bibliography}}

    >[!Synth]
    >**Contribution**::
    >
    >**Related**:: {% for relation in relations | selectattr("citekey") %} [[@{{relation.citekey}}]]{% if not loop.last %}, {% endif%} {% endfor %}
    >

    >[!md]
    {% for type, creators in creators | groupby("creatorType") -%}
    {%- for creator in creators -%}
    > **{{"First" if loop.first}}{{type | capitalize}}**::
    {%- if creator.name %} {{creator.name}}  
    {%- else %} {{creator.lastName}}, {{creator.firstName}}  
    {%- endif %}  
    {% endfor %}~
    {%- endfor %}    
    > **Title**:: {{title}}  
    > **Year**:: {{date | format("YYYY")}}  
    > **Citekey**:: {{citekey}} {%- if itemType %}  
    > **itemType**:: {{itemType}}{%- endif %}{%- if itemType == "journalArticle" %}  
    > **Journal**:: *{{publicationTitle}}* {%- endif %}{%- if volume %}  
    > **Volume**:: {{volume}} {%- endif %}{%- if issue %}  
    > **Issue**:: {{issue}} {%- endif %}{%- if itemType == "bookSection" %}  
    > **Book**:: {{publicationTitle}} {%- endif %}{%- if publisher %}  
    > **Publisher**:: {{publisher}} {%- endif %}{%- if place %}  
    > **Location**:: {{place}} {%- endif %}{%- if pages %}  
    > **Pages**:: {{pages}} {%- endif %}{%- if DOI %}  
    > **DOI**:: {{DOI}} {%- endif %}{%- if ISBN %}  
    > **ISBN**:: {{ISBN}} {%- endif %}    

    > [!LINK]
    > {%- for attachment in attachments | filterby("path", "endswith", ".pdf") %}
    >  [{{attachment.title}}](file://{{attachment.path | replace(" ", "%20")}})  {%- endfor -%}.

    > [!Abstract]
    > {%- if abstractNote %}
    > {{abstractNote}}
    > {%- endif -%}.
    >
    # Notes
    > {%- if markdownNotes %}
    >{{markdownNotes}}{%- endif -%}.


    # Annotations
    {%- macro calloutHeader(type, color) -%}  
    {%- if type == "highlight" -%}  
    <mark style="background-color: {{color}}">Quote</mark>  
    {%- endif -%}

    {%- if type == "text" -%}  
    Note  
    {%- endif -%}  
    {%- endmacro -%}

    {% persist "annotations" %}
    {% set newAnnotations = annotations | filterby("date", "dateafter", lastImportDate) %}
    {% if newAnnotations.length > 0 %}

    ### Imported: {{importDate | format("YYYY-MM-DD h:mm a")}}


    {% for a in newAnnotations %}
    {{calloutHeader(a.type, a.color)}}
    > {{a.annotatedText}}
    {% endfor %}
    {% endif %}
    {% endpersist %}
    permalink -
    - https://medium.com/@alexandraphelan/an-updated-academic-workflow-zotero-obsidian-cffef080addd
    obsidian zotero
Links per page: 20 50 100
page 1 / 1
Shaarli 0.0.41 beta - The personal, minimalist, super-fast, no-database delicious clone. By sebsauvage.net. Theme by idleman.fr.