/txt/ - Plaintext General

Share your favorite tools, tricks or hints for manipulating or utilizing glorious plaintext.

Learn awk
ia802309.us.archive.org/25/items/pdfy-MgN0H1joIoDVoIC7/The_AWK_Programming_Language.pdf

And/or sed
grymoire.com/Unix/Sed.html

Get started using vim
vimhelp.appspot.com/usr_toc.txt.html#usr_toc.txt

Learn how to use Emac's org-mode
orgmode.org/orgguide.pdf

Format text
linux.die.net/man/1/fmt
> Hardcore mode
nicemice.net/par/

Will text files ever become obsolete?

Other urls found in this thread:

oreilly.com/openbook/utp/
passwordstore.org/
plaintextaccounting.org
ledger-cli.org
hledger.org
furius.ca/beancount
github.com/beancount/fava
ix.io/1jVi
nullprogram.com/blog/2017/09/07/
doc.cat-v.org/bell_labs/structural_regexps/
youtube.com/watch?v=wlR5gYd6um0
youtube.com/watch?v=XA2WjJbmmoM
youtube.com/watch?v=3TX3kV3TICU
home.windstream.net/kollar/utp/
asciimath.org
github.com/jarun/Buku
twitter.com/NSFWRedditImage

I just use sublimetext and Python if there is a lot of text.

I use sed and vim but don't understand a thing of awk. Apparently it's nice for tab-delimited program output l

> mfw you are tasked to write a load of nagios plugins in non-Perl

just use Python

unix sed a shit, psed is where its at.

awk is basically printf the language. The advantage with it is all the simple ways to modify input parameters and blocks of input and stuff. I wish its schema had caught on with other langs like regex did.

I have two copies of this book. Authors later released it for free.
oreilly.com/openbook/utp/

>using anything other than perl for text manipulation and regexs

Is there anything wrong with using nano?

wordwrap

Why is everything a general?
You should probably kill yourself, OP.

why dont you use emacs? It has very similar keybindings.

Not using Code::Blocks.

But nano is actually ok if you're learning some little shit that's

Meta-L

What is the best way to store plaintext passwords? In .txt files?

I mean that it will permanently save reflowed text if wrap is on instead of just reflowing for display. Was really frustrating trying to figure out why all my configs were broken on a distro that defaulted nano to wrap.

OP here.

This is where it's at passwordstore.org/

Don't use pass, an attacker can see metadata. Use kpcli, is a command line interface for keepassx databases.

The perfect introduction and tools to accounting for programmer/Linux type people: ledger, hledger, beancount, and fava.

plaintextaccounting.org
ledger-cli.org
hledger.org
furius.ca/beancount
github.com/beancount/fava

Newspaper articles, BBSs (like this one), IRC, ASCII art, Kopipe, program source code, Novels, View HTML source, Google search engine, math, Hieroglyphics, The Rosetta Stone, Gutenberg Bible...
A textpunk doesn't sit there waiting for information to be slowly fed to him drip at a time by the gogglebox. A textpunk is thirsty for knowledge and 100% focused - they read old school hacker textfile zines. They don't waste their time with lame imageboarders: instead they're doing crazy abstract shitposting on /prog/ with thoughts and concepts twisted up so with many levels of irony that it becomes an art form.
Textpunks recognize and understand the true power of kopipe - how a well crafted piece of text can be so damn powerful that it alone can trigger thousands of replies with so much veracity within days. They see through things down into the core of what really counts, everything in the computer is built of text, ascii, strings of bits - They don't care about the latest 3D GUI environment fads. No, that's just a distraction. 7-bit clean ascii program source code. That's textpunk.
Look at how txt has shaped humanity: The birth of writing systems was correlated with some of fastest advances of science and technology in early human history. Mass production of the Bible took power away from a few select monks and democratized paving the way for people to start thinking for themselves. Programming is text and it's the closest thing there is in the world to true wizardy and spell casting. Talking about real SICP-type programming here, not that modern garbage.
Today textpunks build up digital libraries of books and stick it to the copyright cartel. lib gen, the gentoomen library, and so many anonymous sources that tireless scan and collect books.. Textpunks are the people in tune with modern digital society of ultrafast cost-free transmission of text, they're the ones rethinking and revolutionizing publishing mixing it with open rights and making works available online.

hnb (outliner, wiki and xml editor)
SC-IM (spreadsheet compatible with xlsx, default format is plaintex)
WordGrinder (word processor compatible with odt)
Pandoc (document converter for various formats)
catdoc (xls2csv, catppt, wordview, can convert to plaintext various MS formats)

Good one user, I forgot about this ix.io/1jVi
The perfect pasta.

Emacs, org-mode, multiple-cursors, and Clojure are all I need these days.

>multiple-cursors
Enjoy your shitty performance
nullprogram.com/blog/2017/09/07/

Emacs is slow overall, gapped buffer not being optimized for multiple cursors isn't really that big of a deal.

Why not use macros and rectangles like a sane person?

I like the Org-mode format but I don't want to use Emacs. Any tips?

Emacs macros are still pretty slow and lag when more complicated. It's still saner that multiple cursors, I don't get why people use them.

try hnb

doc.cat-v.org/bell_labs/structural_regexps/

is this any useful? where can I find out more?

info m4

Might make an interesting afternoon.

Which one of these is recommended for someone who wants to do their fairly basic personal finances with minimum hassle?

That's cool, didn't know that was a thing.

Nice copypasta.

> WordGrinder (word processor compatible with odt)
Hardly plain text then is it?

vim-wiki is OK
a bit abandoned though

perl

this. anything text related go to perl. try perl6 for the lulz.

abandoned yet still up to date.

even withotu getting into full blown perl psed gives you perl regex powers.

perl is not only regex just check out perl6

>Hardly plain text then is it?
Look again, the full list is about tools converting to plaintext from other formats, wordgrinder included.

Ugh, I still haven't. It looked really good as a language but it's.... not perl. It looks better than python but it's not perl.

Resource thread?
Share resource for learning things beside people usually ask for like programming languages.
post like for bash and learning vim and stuff. and how you learned it

perl is larry jerking it to midget porn while perl6 is larry jerking it to anime

Nah, the issues are piling up.

I find your lack of love for bash history substitutions and expansions disturbing.

Perl is hard to read, like you lose track in middle of your function

That's the secret to perl, never read it ever. You can rewrite it in a tenth of the time it takes to comprehend old perl code.

I can recommend some youtube videos that took me from knowing nothing to being so comfortable as to installing a vim plugin on my browser. Ignore the titles, these are great for beginners, just watch them in this exact sequence:
Mastering the Vim Language youtube.com/watch?v=wlR5gYd6um0
How to Do 90% of What Plugins Do (With Just Vim) youtube.com/watch?v=XA2WjJbmmoM
Let Vim Do the Typing youtube.com/watch?v=3TX3kV3TICU

Anyone got something similar for Perl?

Wow thanks mang I have been learning vim, its really fun and its no mouse thing is really amazing,

Well if you are advanced I found after watching those videos that Learn Vimscript the Hard Way by Steve Losh to be the perfect follow up. I just started using Vim a couple months ago but feels amazing how much a couple videos help me.

Also why not use the documentation on perl5 website its free and they were really good and slow paced and didn't feel over whelmingi really liked the first book in their documentation section

its python time grandpa

Ok, docs on their website look good, thanks.

Honestly, ledger, hledger, and beancount are all pretty similar. They even use almost identical syntax. So it comes down to specific features or third-party things you want to use.

ledger is the original, written in C++. It's the most featured. hledger is a port written in Haskell, and it's mostly compatible with the syntax. beancount is written in Python, and it's based on ledger but does things a bit differently so it's less compatible. beancount seems to be really actively developed though, and the developers put a lot of thought into it, so I like it.

Fava is a web user interface for beancount, and it looks really great. It's one of the main reasons to use beancount.

Read this site. It explains it a lot better than I can: plaintextaccounting.org

Why would anyone ever need anything but regex and Javascript? I can solve any* text manipulation problem with these two things.

*Given enough time

Vim?
:h user-manual

There is no alternative.

yes and experiment with sam or acme, if you don't want to install p9p there is vis (vi with structural regex)

why would you even consider javascript? what kind of monster are you?

It has fucked up table of contents.

How so?

I'm trying to love Emacs but its hard

I copy edit and write tech lit reviews for a living. Any reason I should consider using Emacs or some other autism? Currently using proprietary publishing software that's frustratingly slow and ugly, but works most of the time.

Oh, you mean the bookmarks? How unfortunate. It is a scanned document though. You can get a fully digital copy from here home.windstream.net/kollar/utp/ though it doesn't have any bookmarks.

Whats hard man? Did you do the tutorial? C-h t
Just use the basics to move around and you'll get the hang of it fast

To me, even after reading all that, they seem so similar as to be the same program. I will probably stick to the original ledger as I don't need a web user interface. Thanks for the help!

thanks

Any idea how can I manage my bookmarks? I have this big HTML file in netscape format (firefox) but I need an independent program to organize them independently from any browser.

I hope you guys have ideas on how to do this.

Is it possible to train neural networks to generate regular expressions? Really makes you think.

>Will text files ever become obsolete?

if nerds ask normal customers to learn sed awk vim AND emacs the answer is definitely YES

i don't understand, what do you want organize with bookmarks?

Web addresses. I just want a way to browse my collection of bookmarks without relying on a specific web browser.

generate regular expressions for what exactly?

Looks like a task for a some script which would convert the HTML file into, let's say, CSV.

No, emacs is shit.

No need for Emacs specifically, but sounds like you need some plaintext love in your life. Why not try it in a lazy afternoon?

Most advanced editors like emacs, vim and joe you learn them organically, so try to make something with it like a small project. And configure your editor to make the boring stuff for you.

I am a emacs lover, and I love that it is fast, but the emacs harsh reality is emacs sucks for editing text but it integrates so well with a lot of stuff that it's amazing, like git, email, irc, documentation that really makes any IDE something pre-historic. Just like today I patched a program from emacs using the email client and all I did was just select the region created a file yanked it and ran the diff command in M-!. like 10 seconds tops I dare you to do something like that in any IDE.

Why not a general low graphics thread? We had so much fun sharing ASCII art in the last thread.

>Is there anything wrong with using nano?
It's not pico.

Yeah. Delete all the porn URLs. It should then be a lot easier to manage normally.

Or just put it everything into an encrypted text file or org mode file.

pass is way too insecure with the way it uses loose files. You leak so much metadata, and depending on your filesystem there are a lot of potential vulnerabilities.

Also, using your GPG key is stupid, PGP is not forward secret.

Use beancount. beancount does a lot of consistency checking and ledger doesn't.

With ledger, you'll have lots of fun hunting down typos.

I use ledger, pretty nice

I moved emacs from using vim for around 6yrs, and didn't intend to stay.

But here I am after 12 months, and still loving and learning it. I'm with you on the editing and if evil mode wasn't available I'd be back using vim.

One of the biggest selling points is the integration that emacs provides, and org-mode.

Matching strings based on the differences of two data sets.

I've grown really fond of asciimath recently ( asciimath.org ), I use it with markdown to take notes and do assignments for my math-y classes. Very comfy solution.
Theres a pandoc filter for asciimath on github - it only works with pandoc v.1.17 though

I always viewed awk as a shitty hack. What most sysadmins used it for is splitting a line, but I always have preferred the unix utils cut,paste, split and cat for text, and of course sed. For more demanding tasks I used to switch to Perl and now Python. There has been no reason to awk since Perl.

There has been no reason to Perl since Python.

I was like this, but then I came across 1) the Python interpreter overhead 2) the lack of consistent python versions everywhere and 3) the suboptimal interaction of python with subprocess/shell commands

Two scripts for comparison (fish), both get the used memory percentage:

Awk
echo (free -m | awk 'NR==2 {print 100*$3 / $2}')
0.01user 0.00system 0:00.01elapsed

Python
import re
import subprocess as sp

out = sp.check_output(['free', '-m'])
vals = (re.split('\s+', out.decode('ascii').splitlines()[1]))
print(100*int(vals[2])/int(vals[1]))

0.05user 0.01system 0:00.06elapsed

awk is much nicer.

Bump

Wrong, and now that Perl has the PDL there is no reason for scipy.

So, I've been thinking of learning emacs, but if Guile/Emacs is the future, I want to start with it and not bother with EmacsLisp. Is there a list on what's the status? Are spacemacs and other stuff a thing yet on Guile/Emacs? Also, are there any fundamental differences? Would most of the learning resources also be applicable for Guile/Emacs?

That's because Python... I even don't know what Python tries to be, some modern age BASIC?
But Awk (and Perl) are languages suited for interaction with text, that's why these kinds of programs will be long in Python and short in Perl.

...

Not really, but if you're semi-proficient with Vim, it feels dumbed down and slow.

github.com/jarun/Buku

buku is a powerful bookmark manager written in Python3 and SQLite3. When I started writing it, I couldn't find a flexible cmdline solution with a private, portable, merge-able database along with browser integration. Hence, Buku (after my son's nickname, meaning close to the heart in my language).

buku fetches the title of a bookmarked web page and stores it along with any additional comments and tags. You can use your favourite editor to compose and update bookmarks. With multiple search options, including regex and a deep scan mode (particularly for URLs), it can find any bookmark instantly. Multiple search results can be opened in the browser at once.

Forward secrecy is about communication, not about storing data.

Comfy thread

>buku
Isn't one similar written in Perl?

Nice.