Ramen Junkie

There and Back Again, A Joplin Tale

So, I’m using Joplin for my notes. Again. Still? Maybe a week ago, I saw an article about using Obsidian to post directly to WordPress. Which seemed like a neat thing, since I already just, write everything directly in Joplin. I also kind of looked around into Obsidian’s more robust plug in ecosystem. I had tried Obsidian briefly when switching off of One Note and to my more Markdown centric workflow. For whatever reason, I went with Jplin then.

So I decided, Ok, Obsidian seems to be a popular gold standard, it has better plug ins, I’m going all in. Migrating from Joplin was pretty easy, Joplin has an export that just dumps everything into a basic directory structure of Markdown files. Obsidian lets you drag and drop files in. Everything was working great. I also pulled in a bunch of my other saved news articles from my Github repository of saved news articles. Let’s get it all! I found an importer plug in and started importing my leftovers from One Note, one notebook at a time, sorting them down. Everything was going great.

Asie from, I find the Obsidian Tree, that mixes folders and files, to be absolutely cluttered and hideous. I found a plug in to fix this, but the plug in, somehow makes everything separate, but MORE ugly. I decided I would “get used to it” and “Use search more”.

There was also the matter of syncing between my two PCs and my phone. Obsidian has a paid tier, which does syncing, but I want the syncing to go through something I have more control over. Specifically, Encrypted then through OneDrive, like I use for Joplin. I want something I can download and backup locally as needed separate from the application. There is, thankfully, a popular plug in called Remotely Save, that lets you do just this, for free.

Hooo boy what a mess that was.

I am not really blaming Obsidian, or even Remotely Save, but I just, could NOT get this to work. At all. It would work just fine on the first upload, I could see all the encrypted data in my OneDrive, but pulling it down would create errors, all the time, all sorts of errors. I never did quite figure out why, it could be a combination.

  • I think I may have been occasionally hitting an API limit on OneDrive, because I was pulling down so much.
  • The plug in absolutely does not seem to know how to resume if it gets hung up, it just, fails forever more.
  • I found at one point that it was creating file names with forbidden characters, like “?”, I stripped those out of the files/headlines.
  • The plug in doesn’t seem to know how to handle if you move where the remote notebook is. I was saving “My Notebooks” to a folder in the cloud called “Obsidian.” Except this isn’t the default name, it names it after the notebook name. Sometimes I would forget to change this, then have to change it.
  • It also gets weird if you use the wrong Encryption Key. I would often enter the key, then forget to go through the confirm change dialogues, see also why I kept fucking up the remote location folder name.
  • Screwing up the encryption Key would mean it downloads a bunch of jibberish notes, which would then become part of the main notebook once a proper sync was done.
  • I tried recreating fresh notebooks to clear errors and I would randomly get old versions, despite everything pointing to the proper place
  • At leat once, It reverted back to the old remote folder name default.
  • It started randomly deleting notes, which really had me panicking, but I managed to dig everything out of the trash and restore it.

I tried several other sync plug ins, including some Git based ones, but they didn”t seem to work. Syncing across the cloud is extremely important to this while operation. In the end, I decided to just, go back to Joplin. I may still use Obsidian to middleman and finish my OneNote importing, but otherwise, my experience was terrible, and non-functional for my needs.

Sunday 2025-03-23 – Link List

Blogging Intensifies Link List for Sunday 2025-03-23

Saturday 2025-03-15 – Link List

Blogging Intensifies Link List for Saturday 2025-03-15

Python – Simple URL Extractor

This one is pretty basic tier, but more useful than most. I had a website full of links to pages of video files. I wanted a list that I could stick into yt-dlp. I could do a bunch of copy and pasting, or I could use Python to scrape and take all the links.

It takes a URL as a CLI Argument, specifically like:

> main.py https://website.com

It skims the page with Beautiful Soup and spits out a text file with the date-time-url.txt format. Useful if a site changes over time.

The site I was scraping was using some relative links, so it checks for “http” in the URLs and if its present, just dumps the URL, otherwise, it prepends “REPLACEME” in front of the link, so it’s easy to do a Find/Replace operation and add whatever the full URL is.

For example, if the URL is “/video/12345.php”, which takes you to “website.com/video/12345.php”, it outputs “REPLACEME /video/12345.php” on each line. It’s easy to then replace the “REPLACEME” with the URL on 1-1000+ URLs. I didn’t just add the URL because, at least for my use case, the links added a bit more than just the base URL, and I wanted it to function more universally.

Anyway, here is the script. I don’t think it uses any non-standard library that would need a pip install or anything but if it does, it’ll complain and tell you what to do.

## Simple URL Extractor
## ToUse, at CLI $> python3 main.py [Replace With URL No Braces]
## Will output a list of all href links on a page to a file witht he date time and URL.
## Useful for pushing to a bulk downloader program, though it does not processing so URLs may need to be edited
## If there is not full URL, it pre prends an easily find/replaceable slug

import httplib2
import sys
from datetime import datetime
from bs4 import BeautifulSoup, SoupStrainer

current_datetime = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")

try:
    url = sys.argv[1]
except IndexError:
    print("Error: No URL Defined! Please use main.py [URL]")
    sys.exit(1)

http = httplib2.Http()
status, response = http.request(url)
filename = f"{current_datetime}-{url.split('//')[1].replace('/','_')}.txt"

with open(filename, "x") as f:
    for link in BeautifulSoup(response, 'html.parser', parse_only=SoupStrainer('a')):
        if link.has_attr('href'):
            #print(link['href'])
            write_link = link['href']
            if "http://" not in write_link:
                write_link = f"REPLACEME_{write_link}"
            f.write(f"{write_link}\n")


## Reference
## https://stackoverflow.com/questions/1080411/retrieve-links-from-web-page-using-python-and-beautifulsoup
## https://stackoverflow.com/questions/4033723/how-do-i-access-command-line-arguments
## https://stackoverflow.com/questions/14016742/detect-and-print-if-no-command-line-argument-is-provided

Friday 2025-03-07 – Link List

Blogging Intensifies Link List for Friday 2025-03-07