Commit Graph

203 Commits

Author SHA1 Message Date
tastytea 71a754ed1c
Add functions to convert between list<string> and Json::Value. 2020-01-01 12:13:35 +01:00
tastytea 7267981c37
Add ParseException.
continuous-integration/drone/push Build is passing Details
2019-12-31 13:29:45 +01:00
tastytea 71783b2638
Simplify storing boolean values after inquiring.
continuous-integration/drone/push Build is passing Details
2019-12-31 08:00:31 +01:00
tastytea fec7ac92da
Only configure @VARIABLES@ in version.hpp.in. 2019-12-29 10:32:16 +01:00
tastytea dcc07fab75
Refine hashtag-regex.
continuous-integration/drone/push Build is passing Details
2019-12-29 08:56:27 +01:00
tastytea 7e0278b542
Reduce scope of using declarations in main.cpp.
continuous-integration/drone/push Build is passing Details
2019-12-29 08:46:15 +01:00
tastytea dec712b43e
Add - und \u\u200b (zero width space) as word delimiters.
continuous-integration/drone/push Build is passing Details
2019-12-29 08:38:16 +01:00
tastytea a8c3127570
Replace using namespace with namespace. 2019-12-29 08:33:31 +01:00
tastytea 9031f0d526
Shut up clang-tidy about goto. 2019-12-29 08:33:06 +01:00
tastytea 26b3d56fdf
Don't output access token in debug log.
continuous-integration/drone/push Build is passing Details
2019-12-29 05:27:16 +01:00
tastytea bc2364875d
Replace for-loop with std::any_of.
continuous-integration/drone/push Build is passing Details
2019-12-29 04:00:48 +01:00
tastytea 51673c7f2a
Calculate post length correctly.
continuous-integration/drone/push Build is passing Details
2019-12-29 03:47:57 +01:00
tastytea 75a18dc21c
Fix maximum length log message. 2019-12-29 03:34:10 +01:00
tastytea 9dfb6715c7
Narrow scope of omission. 2019-12-29 03:34:00 +01:00
tastytea 4c49dafafd
Log status.
continuous-integration/drone/push Build is passing Details
2019-12-29 02:48:56 +01:00
tastytea 9477add980
Explicitly set len_append to 0 if nothing to append.
continuous-integration/drone/push Build is passing Details
2019-12-29 02:41:13 +01:00
tastytea 82b136aeca
Log maximum status length before resizing. 2019-12-29 02:39:00 +01:00
tastytea d7fb71dc95
Append link adter resizing. 🤦
continuous-integration/drone/push Build is passing Details
2019-12-29 02:25:08 +01:00
tastytea 2099f48cef
Subtract title length from maximum length if `titles_as_cw` is set.
continuous-integration/drone/push Build is passing Details
2019-12-29 02:08:09 +01:00
tastytea 2db204e6a2
Fix resizing bug.
continuous-integration/drone/push Build is passing Details
2019-12-29 01:45:13 +01:00
tastytea 06e9fe63da
Consider Subject (CW) size when calculating total size.
continuous-integration/drone/push Build is passing Details
2019-12-29 01:05:08 +01:00
tastytea 2a1cbe5f8a
Log right URI for temporaray redirects.
continuous-integration/drone/push Build is passing Details
2019-12-29 00:49:23 +01:00
tastytea e8ac4869b1
Treat permanent redirects after temporary redirects as temporary.
continuous-integration/drone/push Build is passing Details
Example:
http://example.com/ returns 302 with Location: http://example.com/1
http://example.com/1 returns 301 with Location: http://example.com/2

http://example.com/ will not be overwritten in the config file.
2019-12-29 00:41:14 +01:00
tastytea 94ca8bffaf
Don't cut in the middle of a word.
continuous-integration/drone/push Build is passing Details
2019-12-29 00:11:26 +01:00
tastytea 937b08ff85
Parse watchwords only once.
continuous-integration/drone/push Build is passing Details
2019-12-29 00:05:13 +01:00
tastytea 90f9cecf7b
Remove unnecessary else.
continuous-integration/drone/push Build is passing Details
2019-12-28 23:39:56 +01:00
tastytea 78e8e6b92e
Log if we stop parsing a document. 2019-12-28 23:39:35 +01:00
tastytea e899754633
Allow GUID to be empty.
continuous-integration/drone/push Build is passing Details
2019-12-28 23:33:49 +01:00
tastytea c81d60242c
Apply individual fixes before removing HTML.
continuous-integration/drone/push Build is passing Details
2019-12-28 23:31:10 +01:00
tastytea bb86f321b5
Cut post if append is empty; add ellipsis.
continuous-integration/drone/push Build is passing Details
2019-12-28 23:10:49 +01:00
tastytea fafe586cc4
Log path of watchwords.json after reading.
continuous-integration/drone/push Build is passing Details
2019-12-28 09:58:49 +01:00
tastytea 2a0fd3d6e4
Catch JSON errors. 2019-12-28 09:55:41 +01:00
tastytea bad3059092
Add watchwords (hashtags) support. 2019-12-28 09:48:42 +01:00
tastytea 4d2353e3d5
Initialize profile in Config correctly. 2019-12-28 09:48:33 +01:00
tastytea 2b0a091e87
More renaming. 2019-12-28 09:10:32 +01:00
tastytea a692e00128
Make _profile in Config public and rename to profile. 2019-12-28 09:04:52 +01:00
tastytea 61d591e925
Rename profile → profiledata. 2019-12-28 09:01:17 +01:00
tastytea f0c4d63548
Add function Config::get_config_dir(). 2019-12-28 08:49:13 +01:00
tastytea 23ec71ff60
Fix jsoncpp include. 2019-12-28 08:48:55 +01:00
tastytea ca2b9a16e4
Move installation of watchwords.json to root CMakeLists.txt
continuous-integration/drone/push Build is failing Details
2019-12-28 08:03:34 +01:00
tastytea 8650c3cc6b
Convert size_t to Json::Value::UInt64 for jsoncpp.
continuous-integration/drone/push Build is failing Details
jsoncpp-1.7.4 can't convert it itself.
2019-12-28 07:55:48 +01:00
tastytea 2fca800868
Add log message for first run. 2019-12-28 07:16:15 +01:00
tastytea 8bfd9218cb
Post new items. 2019-12-28 07:13:56 +01:00
tastytea 477bf265d4
Add MastoAPI. 2019-12-28 07:13:30 +01:00
tastytea ec8bc6508c
Add operator != to Item.
To be able to determine if the last item is visited in main().
2019-12-28 07:12:28 +01:00
tastytea 74369d6ab5
Rename _data → _profile. 2019-12-28 06:57:23 +01:00
tastytea 4168e77648
Only add one new item if it is the first run. 2019-12-28 06:54:05 +01:00
tastytea 9a3fb420d7
Begin with the oldest item. 2019-12-28 06:48:35 +01:00
tastytea 527c2347ea
Fix bug where titles_as_cw would get the value of titles_only. 2019-12-28 06:47:56 +01:00
tastytea 8b0c2500f9
Fix some initializations. 2019-12-28 06:27:56 +01:00
tastytea ebf5a2cd00
Fix return code initialization in access token generation.
Brace-initialization won't work here because return_call is a struct without
initializer.
2019-12-28 06:03:41 +01:00
tastytea 35afb2800e
Change ProfileData::max_size to size_t. 2019-12-28 05:53:49 +01:00
tastytea 66292f7b15
Convert paths to C strings in fstream initializers.
continuous-integration/drone/push Build is failing Details
2019-12-26 04:06:04 +01:00
tastytea 711e3199af
Add Boost::regex to dependencies.
continuous-integration/drone/push Build is failing Details
2019-12-25 23:05:48 +01:00
tastytea 255afcea02
Try to find restclient-cpp if its CMake config is not found.
continuous-integration/drone/push Build is failing Details
2019-12-25 22:50:25 +01:00
tastytea 75005cdae0
Drop version requirement for jsoncpp.
continuous-integration/drone/push Build is failing Details
2019-12-25 21:40:48 +01:00
tastytea 359bcacd1f
Clarify redirect log messages. 2019-12-25 19:31:07 +01:00
tastytea d0ea315e08
Remove useless move. 2019-12-25 19:28:48 +01:00
tastytea eca12c0831
Create config dir if it doesn't exist.
continuous-integration/drone/push Build is failing Details
2019-12-25 07:18:51 +01:00
tastytea d9b8b4407f
Formatting. 2019-12-25 07:08:41 +01:00
tastytea 1bbebe2977
Actually write new config. 🤦
continuous-integration/drone/push Build is failing Details
2019-12-25 07:03:18 +01:00
tastytea 4491af53db
Handle HTTP redirects.
continuous-integration/drone/push Build is failing Details
2019-12-25 06:31:55 +01:00
tastytea d08bb95fbd
Pass whole Config object to Document. 2019-12-25 06:27:57 +01:00
tastytea ed14492b46
Add method write() to Config. 2019-12-25 06:25:11 +01:00
tastytea f6b5ccbe22
Add a bit of logging. 2019-12-25 02:42:47 +01:00
tastytea e1a973f11f
Apply user-fixes. 2019-12-25 02:42:27 +01:00
tastytea 2bb03dd104
Extract and parse <item>s from RSS feeds. 2019-12-25 02:08:53 +01:00
tastytea a369e96177
Add last_guid to ProfileData. 2019-12-24 22:35:49 +01:00
tastytea c631e5c4fe
Add debug logging.
continuous-integration/drone/push Build is failing Details
2019-12-24 18:53:45 +01:00
tastytea bf29df39e9
Read and parse config. 2019-12-24 18:53:00 +01:00
tastytea 7bba87575f
Print --help, --version and implement downloading.
continuous-integration/drone/push Build is failing Details
2019-12-20 01:14:23 +01:00
tastytea 39ad18efc0
Update CMake config for src/. 2019-12-20 01:13:19 +01:00
tastytea e8b0e83bc8
Update version template. 2019-12-20 01:12:14 +01:00
tastytea 8870c37a42
Delete old sources. 2019-12-20 01:11:40 +01:00
tastytea 2321802575
Rewrite root CMake recipe. 2019-12-16 15:22:54 +01:00
tastytea 1054179b1f
Replaced for-loops with std::transform, changed a variable name.
the build was successful Details
2019-04-21 04:14:02 +02:00
tastytea 7b3cb678ca
Ported to mastoson-cpp 0.105.0. 2019-04-21 04:00:55 +02:00
tastytea d02ca95345
Removed superfluous const. 2019-04-21 03:38:15 +02:00
tastytea 26eab23305
Fixed ambiguous conversion
the build was successful Details
2018-10-08 19:41:21 +02:00
tastytea d575ddd139
Added a bit of verbosity to error codes 2018-10-08 01:53:28 +02:00
tastytea 8955dedb46
Fixed issue with mastodon-cpp >= 0.18.6 (uint16_t vs. uint_fast16_t) 2018-10-08 01:40:53 +02:00
tastytea 2cf7cac099
Bugfix: Don't throw unknown error if return code from mastodon-cpp is != 0 2018-10-08 00:36:54 +02:00
tastytea 603532a334
bugfix: Stopped freezing in configure step if an empty value is entered. 2018-09-20 06:23:44 +02:00
tastytea 4297f68d41
Don't wait(interval) after last entry 2018-09-20 05:45:22 +02:00
tastytea 257a7dbb93
Added configurable interval between posts to prevent flooding and to allow compliance with newsbots.eu. 2018-09-20 05:06:10 +02:00
tastytea d54d6513b6
This REALLY fixes bug #1 (I checked the size, but not properly resized the content 🤦)
the build was successful Details
2018-08-30 01:24:19 +02:00
tastytea 105b836651
typo
the build was successful Details
2018-08-30 01:19:33 +02:00
tastytea 2619e311cf
Added check if toot really was sent
the build failed Details
2018-08-30 01:13:22 +02:00
tastytea 4710021393
Bugfix: Did not count characters in content warnings, resulted in lost messages.
fixes #1
2018-08-30 01:07:19 +02:00
tastytea 786dd9fb81
Unescape spoilered titles 2018-08-26 20:08:41 +02:00
tastytea cc12005a4b
watchwords.json is no longer required to exist.
the build was successful Details
Fixes #2
2018-08-26 19:46:07 +02:00
tastytea 024a7e0af7
bugfix: Too long posts would sometimes not be shrinked
the build was successful Details
2018-08-25 23:52:22 +02:00
tastytea cb31080a57
Oops, forgot error checking.
the build was successful Details
2018-08-25 23:38:17 +02:00
tastytea cf3f13fff1
finish support for CW as title
the build was successful Details
2018-08-25 14:53:48 +02:00
tastytea 929cb540d4
rewrote parse_website() to return vector of Mastodon::Easy::Status 2018-08-25 14:23:58 +02:00
tastytea 473442f612
Added config option "titles_as_cw"
the build was successful Details
2018-08-24 17:54:46 +02:00
tastytea 7310f49370
git.schlomp.space -> schlomp.space 2018-06-04 21:02:07 +02:00
tastytea 798753ad25
Changed URL when registering on Mastodon server 2018-06-04 20:22:33 +02:00
tastytea 910d8be5c7
Don't force visibility 2018-05-15 12:29:18 +02:00
tastytea a2858ec62b
Fixed the post-size calculation 2018-05-13 08:19:50 +02:00