topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday December 12, 2025, 7:51 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Recent Posts

Pages: prev1 ... 21 22 23 24 25 [26] 27 28 29 30 31 ... 101next
626
N.A.N.Y. 2018 / NANY 2018 Release: twtxtc
« Last post by Tuxman on September 17, 2017, 11:09 AM »
Application Name twtxtc
Short Description A command line client for the twtxt micro-blogging network
Supported OSes
  • tested on FreeBSD and Windows 10
  • will probably work everywhere else as long as a decent C compiler and curl exist
Licenses CDDL 1.0 (since Nov 2020)
Web Page https://hub.darcs.ne...rtuxmalwieder/twtxtc
Download Link Check the attachment or compile your own version from the website
System Requirements
  • runtime: curl (executable) in your PATH
  • building: CMake and a C compiler
Author Take a guess!

A command-line client for the twtxt micro-blogging system, written in C.

README (excerpts pasted here for your convenience, please refer to the website for boring technical details and TODOs):

What is twtxt?

twtxt is a decentralised, minimalist approach to micro-blogging, similar to Twitter but with self-hosted plaintext files. See the original twtxt documentation for details. twtxtc is a twtxt client written in the C language.

Requirements

Build or download an appropriate curl binary for your system and place it into your $PATH or the twtxtc folder. If you don't, you won't be able to retrieve your timeline. Sorry.

Usage

./twtxtc [COMMAND]

Commands

tweet <text>            Adds <text> to your twtxt timeline.
timeline                Displays your twtxt timeline.
following               Gives you a list of all people you follow.
follow <user> <URL>     Adds the twtxt file from <URL> to your timeline.
                        <user> defines the user name to display.
unfollow <user>         Removes the user with the display name <user> from your timeline.
help                    Displays a help screen.

Configuration

If found, twtxtc will use the .twtxtconfig file inside your HOME directory. (See twtxtc help for information on where it should be found.) The .twtxtconfig file is meant to be a valid JSON file like this:

{
    "nickname": "tux0r",
    "twtxtfile": "twtxt.txt",
    "maxlog": 100,
    "spacing": "   ",
    "following": {
        "user_1": "https://example.com/twtxt.txt",
        "user_2": "https://elsewhere.com/tweets.txt"
    }
}

Possible entries are:

  • nickname: Your preferred nickname. Only used to filter mentions to other people.
  • twtxtfile: The location of your twtxt.txt file. Defaults to ./twtxt.txt.
  • maxlog: The maximum number of entries shown when you view your timeline. Defaults to 100.
  • spacing: A string value that contains the spacing between the user name and the text when viewing your timeline. Defaults to three spaces.
  • following: A list of users you follow. Can be managed with the follow and unfollow commands.
The current limit of the list of users you are following is at 4 KiB. You probably won't reach that limit any time soon.

A Windows binary is attached. Here is the source code for your pleasure:
https://hub.darcs.ne...rtuxmalwieder/twtxtc

Have fun etc. etc.
627
N.A.N.Y. 2017 / Re: NANY 2017: Tiny Server Inventory
« Last post by Tuxman on September 11, 2017, 02:08 PM »
A search ability was planned but I couldn't find time for it. :( That's why I wonder if anyone wants to maintain it.
628
N.A.N.Y. 2017 / Re: NANY 2017: Tiny Server Inventory
« Last post by Tuxman on September 10, 2017, 05:31 PM »
As I noticed my plans to improve "TSI" are (more or less) postponed indefinitely, I wonder if anyone of you would be interested in an Open Source version of it (namely, just access to the source code). I might upload it somewhere then.
629
While reviewing small browsers, I came across NetSurf as well. NetSurf is a fast and bloat-free web browser which happens to have got JavaScript support in younger incarnations by adding the Duktape ECMAScript engine.

Duktape, written in C, is much smaller than V8 or similar JS engines, making it a good choice for embedded systems or things like adding a scripting functionality to existing software. No web browser involved! It supports ECMAScript 5.1 with some additions from newer revisions, including regular expressions and Unicode. For lazy people like me, there is a C++ wrapper named Dukglue (quack!) available which lacks (good) documentation but works like a charm. If you ever thought that your application could need a good scripting engine, Duktape seems to be a good choice. Your C/C++ code can access any script functions and your scripts can access exported C/C++ symbols which is easier than it sounds.

You want an example? You get an example!
Assume that you want to have a JavaScript plug-in which doubles any input value.

Code: Javascript [Select]
  1. var DemoScript = {};
  2. DemoScript.double = function(number) {
  3.     return number*2;
  4. }
  5. DemoScript;

Here's how Dukglue probably* handles it:

Code: C++ [Select]
  1. #include <string>
  2. #include <iostream>
  3. #include <fstream>
  4. #include <dukglue/dukglue.h> // <- this is important
  5.  
  6. // ... blah ...
  7.  
  8. void processScripts(scriptfile) {
  9.     duk_context* ctx = duk_create_heap_default();
  10.    
  11.     std::ifstream infile(scriptfile); // add the exists() check yourself pls.
  12.     std::string file_contents = [&infile] {
  13.         // Read the script file contents for processing.
  14.         std::ostringstream ss{};
  15.         ss << infile.rdbuf();
  16.         return ss.str();
  17.     }();
  18.  
  19.     try {
  20.         // Give me a local handle to the script:
  21.         DukValue script = dukglue_peval<DukValue>(ctx, file_contents.c_str());
  22.  
  23.         // Try to call double(2):
  24.         int value = dukglue_pcall_method<int>(ctx, script, "double", 2);
  25.         std::cout << "The double value of 2 is " << value << std::endl;
  26.     }
  27.     catch (DukException& e) {
  28.         // Damn.
  29.         std::cout << "Blimey! Something bad happened. " << e.what();
  30.     }
  31.    
  32.     duk_destroy_heap(ctx);
  33. }
  34.  
  35. // now call processScripts("double.js"); or whatever.

* I was lazy, I just assumed it would work like this and it probably does. A more complex and actually tested ;) example is part of my blog software (nudge, nudge).

According to mouser, this might be interesting for more people than just me. So here it is. :)
630
Those are not even remotely as easy as WPMU, sadly.
631
multi-user cms/blog system where we would only have to maintain one central piece of software and could create lots of individual user accounts

WordPress has a built-in "network" functionality (formerly known as "WordPress MU" for "Multi-User"). The only notable disadvantage is that it's still WordPress.
632
Living Room / Re: Educational resources for developing Critical Thinking skills.
« Last post by Tuxman on August 30, 2017, 05:15 PM »
Long, boring text, trying to teach you to think yourself:-\

633
Developer's Corner / Re: Your First Programming Language vs Now
« Last post by Tuxman on August 30, 2017, 08:45 AM »
Node.js is not even a language.
634
DC Member Programs and Projects / Re: blogcpp: Static blogging in C++17
« Last post by Tuxman on August 26, 2017, 11:32 AM »
Someone provided Debian GNU/Linux binaries:
https://blog.mdosch....-in-debian-benutzen/

(It's in German, but you should be able to find the .tar.bz2 link.)
635
DC Member Programs and Projects / Re: blogcpp: Static blogging in C++17
« Last post by Tuxman on August 24, 2017, 05:12 PM »
At least it opens your eyes for a new perspective (i.e. a number of compilation errors you cannot reproduce).  ;D
636
DC Member Programs and Projects / Re: blogcpp: Static blogging in C++17
« Last post by Tuxman on August 24, 2017, 03:05 PM »
Version 5 will presumably be released this weekend. I found a tester on GNU/Linux who helped me squash a number of bugs and introduce newer, better bugs.

Debian sid can do BlogC++ now.  :D
637
Living Room / Re: Can DC member bail out Firefox via Waterfox ?
« Last post by Tuxman on August 22, 2017, 06:01 AM »
The Waterfox Project seems to be the only viable alternative that bears the promise of maintaining the legacy add-ons which shall soon no longer be compatible with Firefox.

Have you ever heard of Pale Moon?
638
Found Deals and Discounts / Re: Softmaker Shop 40% 0ff
« Last post by Tuxman on August 15, 2017, 07:32 AM »
you also get access to one year free antivirus updates for Emsisoft Anti-Malware.

Every good offer has a scar, I guess.

1487 copies are still available...

Limited copies of a file?  :huh:

(could be it was rolled out in Europe first)

Softmaker started informing me of their recent discounts a couple of days ago. Germans...  :D
Too bad I already got the Standard Edition.
639
DC Member Programs and Projects / Re: blogcpp: Static blogging in C++17
« Last post by Tuxman on August 14, 2017, 02:50 PM »
BlogC++ can do threading now. Maybe there will be a version 5 this year.
640
 :Thmbsup:
641
Hooray, assumptions!
642
I admit it doesn't look too well for Mercurial. Hmm, Darcs?  :huh: (I still need an excuse to spend more time with it.)
But I also admit that - while ssh:// links were quite common when my go-to VCS was SVN - the number of times I had a ssh:// link in Hg was actually zero up to this day. Doesn't Git have git:// as well?
643
Oh, hooray. Another chat thing which nobody else uses. Why?
644
Or just use a sane VCS.
645
General Software Discussion / Re: Navigate or browse inside a post in a blog
« Last post by Tuxman on August 03, 2017, 02:21 PM »
Hilarious thread so far.

Don't use Javascript unless you are forced to.
646
I thought about using a regex, but it seems pretty painful way to do what i want.

Not really. /word1.{25}word2/ if your distance is 25 bytes.  :huh:
... Still less effort than writing a tool just for this which basically wraps a regex.  ;)
647
grepWin with a regex.
649
We're doomed.
650
Developer's Corner / Re: Your First Programming Language vs Now
« Last post by Tuxman on July 18, 2017, 02:49 AM »
COBOL is awesome for trolling people.  Assume a web application with bells and whistles and people want to see the source and it's all caps.  ;D
Pages: prev1 ... 21 22 23 24 25 [26] 27 28 29 30 31 ... 101next