Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Readme
This script is intended to be used with YAFPA, a free way to share your obsidian vault.
⚠️ The script and site are not a replacement for Obsidian Publish, which is a much more efficient way to share Obsidian files.
pip install YAFPA
The first time you use the script, it will ask you three things :
https://my-awesome-blog.netlify.app/
You can reconfigure the path with yafpa --config
The file will be created in your site_package folder.
usage: yafpa [-h] [--preserve | --update] [--filepath FILEPATH] [--git] [--keep] [--config]
Create file in folder, move image in assets, convert to relative path, add share support, and push to git
optional arguments:
-h, --help
: show this help message and exit--preserve, --p, --P
: Don't delete file if already exist--update, --u, --U
: force update : delete all file and reform.--filepath FILEPATH, --f FILEPATH, --F FILEPATH
: Filepath of the file you want to convert--git, --g, --G
: No commit and no push to git--keep, --k
: Keep deleted file from vault and removed shared file--config, --c
: Edit the config fileThe script will convert all file with share:true
and check if the contents
are different to the versions in _notes
. The only things that are
ignored is the contents of the metadata. If you want absolutely change the
metadata you can:
yafpa --file <filepath>
directly--u
to force update all filedate
/title
/created
/update
/link
).⚠️ As always with git, you can repost the exact same file that already exists on the server.
⚠️ In case you have two files with the same name but :
In different folder
With different sharing status or folder The script will bug because The folder is not checked (It's not required). In this unique case, you need to rename one of the files.
In the same way, in case you change the folder key in the metadata, you will have two identic file in different folder.
yafpa
and all yafpa
option without --F FILEPATH
will automatically read all file in your vault to check the share: true
key in metadata (frontmatter YAML).
By default, the script will check the difference between line (cf checking difference), and convert only the file with difference. You can use --u
to force update.
The command will be : yafpa --F filepath
The file to be shared does not need to contain share: true
in its YAML, and will be updated no matter what.
The script :
share: true
frontmatter or specific file) in the _notes
folderassets/img
and convert (with alt support)==mark==
to [[mark::highlight]]
) \n
each \n
)embed: False
)share
to true if one file is shared.Finally, the plugin will add, commit and push if supported.
Note : The clipboard may not work in your configuration. I have (and can) only test the script on IOS and Windows, so I use pyperclip
and pasteboard
to do that. If you are on MacOS, Linux, Android, please, check your configuration on your python and open an issue if it doesn't work.
Note : I can't test on these 3 OSes, so I can't create a clipboard option on my own.
You can add CSS using the file custom.css. The plugin Markdown Attribute allow to use the creation of inline css. Some information about this :
:
after the first {
⚠️ As I use CodeMirror Options and Contextual Typography, I warn you : the use of #tags
to stylize the text before it doesn't work with my build. So, as an option to don't have a random tag in a text, you can use custom.css
to remove it with display: none
(you can have an example with #left
).
share: true
: Share the fileembed: false
: remove the transluction (convert to normal wikilinks)update: false
: Don't update the file at all after the first pushfolder
: Use a different folder than _note
(here some more information)
Alternatively, you can use the category
key : category: folder/category
folder
is optional ; as default : _notes
category
can be false
to prevent apparence in the feed
NB : if category
and folder
is used at the same time, folder
will be used as the folder.As admonition is very tricky, I choose to convert all admonition to a "callout Notion". The script will :
```ad-```
to !!!ad-
{: .title}
JavaScript will make all things nice.
⚠️ As always with markdown, you will see some problem with new paragraph inside admonition. You can use $~$
to fake line. The script will automatically add this.
Also, you can add emoji on title to add some nice formatting.
You can now use custom admonition using the file custom_admonition.yml. The file is formated as a YAML :
admonition_type: #In obsidian
- logo #emoji
- admonition title: #the name you want in the website
admonition type
in the admonition plugin.admonition title
you use in the admonition plugin.You need to create multiple key and value for each different synonyme you use (as in admonition...)
You need to found the path of your vault and the blog in your phone. To achieve that, I use a-shell.
First, in a-shell, run pickFolder
and choose the folder of your vault, and rerun pickFolder
to choose the folder where are the blog data (you need to clone with Working Copy)
After, do showmarks
and copy the two path in any note app. Check if the path is not broken because of the paste!
You can also do :
cd
showmarks > bookmark
vim bookmark
Here is a blank sheet to help you if you want to manually write / edit it :
vault=
blog_path=
blog=
share=
With :
vault
: Vault Absolute Pathblog_path
: Blog repository absolute pathblog
: Blog linkshare
: your wanted share key ; by default : share
To use the shortcuts, you need :
Before running the shortcuts, you need to install all requirements, aka :
pip install yafpa
yafpa --C
Links :
For the moment I can't create a shortcut to share only one file, BUT! You can use a-shell
as you do in a normal terminal, aka :
jump <vault>
yafpa --f <file>
To run the script for all your file, run yafpa
.
Note : Compared to pyto, the script cannot work with $HOME
, so the .YAFPA-env
will be created in the folder you use to run it. It is also possible to use multiple folder, but you need to create the file for each. The better is to have one in the vault ; and one in the default folder of a-shell.
→ Please use Wikilinks with "short links" (I BEG YOU) You can integrate the script within obsidian using the nice plugin Obsidian ShellCommands.
You could create two commands :
share all
: yafpa
share one
: yafpa --f {{file_path:absolute}}
You can use :
→ The • indicate that this value is optional
title: My files•
date: 12-11-2021•
embed: true•
update: true•
current: true•
flux: true•
share: false (this key can be changed in the configuration)
category: folder/category (category can be false)
description: my awesome file
You can use MetaEdit / Supercharged links to quickly update the front matter.
category: Roleplay/Application
date: 21-12-2021
share: true
tag: RP/Darkness-Haunted/Application/PC
title: (Darkness Haunted) Alwyn Kallendris
The file will be added in the Roleplay
folder ; and the Application
will now show the file in the sidebar, the Roleplay page and the collections page.
FAQs
A script to share your obsidian vault (in partial way)
We found that yafpa demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.