Using Zotero to index your Steemit posts

in #steemit7 years ago (edited)

Zotero is a plugin for Firefox.

[It] is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources.

Or to make an index for your Steemit posts, so that you don't have to wait for the refresh each time you want to browse below the fold.

  • Firstly, install from here, Zotero's download page, and restart Firefox.

  • Scroll to the bottom of your Steemit blog page, until you reach your first post. Here's mine. That was eight month's ago, and it took nearly three minutes, of scroll refresh, scroll refresh. Something to avoid.

  • The URL of my full blog is still only https://steemit.com/@richardjuckes, so simply trying to bookmark this will not save me from having to refresh again, each time I want to look up some old posts.

  • So, right-click on the page and at the bottom of the menu there is a Zotero option and then

Create web page item from current page

  • Open the Zotero panel:

Ctrl-Shift-Z

and look for the Steemit page. On Linux (Debian) mine has an URL

file:///home/$USER/.mozilla/firefox/9w5u1fjt.default/zotero/storage/VRDH9M62/@richardjuckes.html

and I can bookmark this and use it as an index, offline if I wish. All of the links take me to my posts on Steemit.

  • I can go further if I want, using some Linux tools. I'm sure the devs will tell me many corners I could cut, but ...

  • Install WWW::Mechanize, for the commandline tool mech-dump

apt install libwww-mechanize-perl

  • Scrape the Zotero page you made:

mech-dump -all file:///home/$USER/.mozilla/firefox/9w5u1fjt.default/zotero/storage/VRDH9M62/@richardjuckes.html > my-steemit-posts.txt

  • This file is a bit messy, and the way I clean it up is very ad hoc. Proficient users please be patient.
  • Open my-steemit-posts.txt in an editor and delete the first 90 lines or so, the links to trending posts and so on
  • Remove duplicate lines

uniq -u my-steemit-posts.txt > my-steemit-posts-uniq.txt

  • Because I don't know regex

grep -v com/@ my-steemit-posts-uniq.txt | grep -v comments | grep richardjuckes > my-steemit-posts-uniq1.txt

Of course, changing richardjuckes to your steemit username.

  • my-steemit-posts-uniq1.txt now has a list of the urls of all my steemit posts (307)

mkdir steemit-posts
cd steemit-posts
for i in cat ../my-steemit-posts-uniq1.txt ; do wget $i ; done
for i in * ; do mv $i $i.gz ; done (I'm sure there's a better way of doing this)
for i in *gz ; do gunzip $i ; done
for i in * ; do mv $i $i.html ;

  • This files are still not easily searchable, because there is a lot of steemit.com's links and scripts,

for i in *html ; do lynx -dump $i | grep -v file: > $i.txt ; done

for files that are more easily searchable. And if you've followed me this far, I'm sure you know more than me about the awesomeness of *nix text tools.

I've used the word water in posts 21 times, 9 times in poems, and once three times in one poem.

Sort:  

OK, so I have a copy on the harddisk where I can just ctrl-f find what I like - I will have to look into the rest later. Thanks for the advise!

And thank you for your post today, which prompted me to write this down.

Coin Marketplace

STEEM 0.29
TRX 0.12
JST 0.033
BTC 63457.41
ETH 3119.12
USDT 1.00
SBD 3.94