Git Product home page Git Product logo

textpieces's Introduction

Text Pieces
Text Pieces

Swiss knife of text processing


Download on Flathub

Screenshot

State of the project

The project was rewritten from scratch and moved to a new repository. This repository will never receive updates.

What is it?

Text Pieces is a small tool for quick text transformations such as checksums, encoding, decoding and so on. Written in Vala for GNOME desktop in the hope to be useful.

Features

  • Base64 encoding and decoding
  • SHA-1, SHA-2 and MD5 checksums
  • Prettify and minify JSON
  • Convert JSON to YAML and vice versa
  • Count lines, symbols and words
  • Escape and unescape string, URL and HTML
  • Remove leading and trailing whitespaces
  • Sort and reverse sort lines
  • Reverse lines and whole text
  • Extendable with third-party scripts and custom tools

Installation

From Flathub

Recommended

Click here to install app from Flathub.

Build from source

Via GNOME Builder

Text Pieces can be built with GNOME Builder >= 3.38. Clone this repo and click run button.

Via Flatpak

Text Pieces has a Flatpak manifest to enable it to be built with Flatpak.

Via Meson

Text Pieces can be built directly via Meson:

git clone https://github.com/liferooter/textpieces
cd textpieces
meson _build
cd _build
meson compile

Next, it can be installed by meson install.

Dependencies

If you use GNOME Builder or Flatpak, dependencies will be installed automatically. If you use pure Meson, dependencies will be:

  • vala >= 0.52
  • gtk >= 4.2
  • gtksourceview >= 5.2
  • gio >= 2.50
  • gee >= 0.8
  • json-glib >= 1.6
  • libadwaita >= 1.0
  • python >= 3.8
  • pyyaml >= 5.4

textpieces's People

Contributors

13hannes11 avatar adrianbiro avatar amikha1lov avatar bertob avatar edenalencar avatar gavr123456789 avatar jaragunde avatar liferooter avatar nalsai avatar oscfdezdz avatar ovari avatar pervoj avatar seadve avatar turtlegarden avatar vanillajonathan avatar vistaus avatar weethet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

textpieces's Issues

Respect my theme variant

I use default adwaita (in light mode) and the current interface is pretty jarring for people with poor vision like me.
The app should just follow my system theme instead of enforcing a dark theme, or at least offer a setting.
@bertob

Primary menu padding

The padding on the primary menu popover is too small and looks cramped. I'd bring it in line with other popovers (I think there's 12 or 18px of padding there usually).

image

Nautilus for comparison:

image

Make the application adaptive and mobile-friendly

Text Pieces is not adaptive now and can't be used from touchscreen or on Linux-based phones or tablets.

  • Adaptiveness
  • In-app notification hover analog for touchscreen (can be done in future with AdwToast)
  • Test the application with touchscreen

Ensure all tools have error handling

Some tools have no error handling. It's not good and have to be fixed.

Tools without error handling

  • Unescape HTML
  • Unescape string
  • Unescape URL
  • Format XML

Don't work

The app window is not showing for me on either Wayland or Xorg. I get nothing in the logs. If I start it from CLI no errors show up. The process keeps running. System Monitor shows it as sleeping. The flatpak version works fine, but it's not worth the overhead since I don't use any flatpak apps at all.

Tested on archlinux and Fedora 36

Move argument entries to the top right corner

Argument entries is in the bottom of the window now. It's very strange and non-intuitive pattern. It will be good to move them to the top right corner and place one under one for more familiar search-like UI.

Feature: Live preview

I understand why #63 was closed. However, how about an optional split window with one half showing a live preview of what a filter application would result in?

Execution of the filter should be async of course and not block any of the rest of the app.

text pieces defaults to dark theme

to reproduce:

  1. change settings: gsettings set org.gnome.desktop.interface color-scheme prefer-light
  2. install text pieces
  3. start text pieces

expected:
text pieces is light

actual behavior:
text pieces is dark

Translation of tools.pot

Quick question: where should I place the translation of tools.pot? Normally, po files should be in the po directory, but in this case, the po files in there are already used for the application translation. So where should I put the translation of the tools.pot file?

Fails to build: Syntax Errors

It's not building for me either, although, I'm getting different errors.

FAILED: src/textpieces.p/Application.c src/textpieces.p/Window.c src/textpieces.p/Preferences.c src/textpieces.p/Tool.c src/textpieces.p/ToolsController.c src/textpieces.p/ToolSettings.c src/textpieces.p/CustomToolPage.c src/textpieces.p/NewToolPage.c src/textpieces.p/Search.c src/textpieces.p/Utils.c 
/usr/bin/valac-0.52 -C --debug --debug --target-glib=2.70 --enable-experimental --vapidir /var/tmp/portage/app-text/text-pieces-3.0.2/work/textpieces-3.0.2/src/vapi /var/tmp/portage/app-text/text-pieces-3.0.2/work/textpieces-3.0.2/src/vapi/config.vapi --pkg libadwaita-1 --pkg gtksourceview-5 --pkg json-glib-1.0 --pkg gtk4 --pkg gio-unix-2.0 --pkg gio-2.0 --color=always --directory src/textpieces.p --basedir ../textpieces-3.0.2/src --gresources=../textpieces-3.0.2/resources/textpieces.gresource.xml ../textpieces-3.0.2/src/Application.vala ../textpieces-3.0.2/src/Window.vala ../textpieces-3.0.2/src/Preferences.vala ../textpieces-3.0.2/src/Tool.vala ../textpieces-3.0.2/src/ToolsController.vala ../textpieces-3.0.2/src/ToolSettings.vala ../textpieces-3.0.2/src/CustomToolPage.vala ../textpieces-3.0.2/src/NewToolPage.vala ../textpieces-3.0.2/src/Search.vala ../textpieces-3.0.2/src/Utils.vala
../textpieces-3.0.2/src/Window.vala:465.39-465.39: error: syntax error, expected identifier
                label = selected_tool?.name
                                      ^
../textpieces-3.0.2/src/Window.vala:481.40-481.40: error: syntax error, expected identifier
            var n_args = selected_tool?.arguments?.length ?? 0;
                                       ^
../textpieces-3.0.2/src/Window.vala:517.14-517.23: error: syntax error, following expression/statement delimiter `;' missing
        void show_toast (string text) {
             ^^^^^^^^^^
../textpieces-3.0.2/src/Window.vala:517.26-517.31: error: syntax error, following expression/statement delimiter `)' missing
        void show_toast (string text) {
                         ^^^^^^
../textpieces-3.0.2/src/Window.vala:517.26-517.31: error: syntax error, following expression/statement delimiter `;' missing
        void show_toast (string text) {
                         ^^^^^^
../textpieces-3.0.2/src/Window.vala:517.37-517.37: error: syntax error, expected identifier
        void show_toast (string text) {
                                    ^
../textpieces-3.0.2/src/Window.vala:518.52-518.52: error: syntax error, `new' modifier not allowed on creation method
            toast_overlay.add_toast (new Adw.Toast (text) {
                                                   ^
../textpieces-3.0.2/src/ToolsController.vala:167.28-167.28: error: syntax error, expected identifier
            var obj = root?.get_object ();
                           ^
Compilation failed: 8 error(s), 0 warning(s)

Tool headers does not follow translations

Hi, I just completed the translation of textpieces, and sent two PR for you.

I couldn't fix a problem: Tool headers do not follow translations.

I know it's related to these lines but adding _() didn't affect the label. You may know better.

Ekran Görüntüsü - 2022-10-24 22-20-01

Version: Master branch, the latest commit.

Icon tweaks

The current icon concept is nice, but it could be drawn more geometrically.

Here's an attempt:

image

Let me know if you like the direction, I'd be happy to open an MR.

Spelling error in binary

I just built a quick deb package and came across this warning:


textpieces: spelling-error-in-binary occured occurred [usr/bin/textpieces]

Cheers

Free space around screenshots

I noted that there is some unnecessary free space around the screenshots. The usual screenshot tools (like Alt + Print) should give a fitting screenshot.

Text wrapping

It would be nice to have the option for text wrapping.

Thanks.

Feature: In-place editing

So far Text Pieces only supports in-memory editing, even when you load text from a file.

In other words:

  • Make the "Save to File" button write directly to the same file (if the text was loaded from a file);
  • And add a "Save (copy) as..." button to save to a different file.

Feature: Undo/Redo buttons

It would be nice to have "undo" button e.g. next to "Apply". It could simplify work a lot! Now once I apply some tool to my text and want to use the second tool I have to reopen the original text. Also, some two section window (one for input, one for output) might be a solution or the next interesting feature.

CTRL-C copy all buffer

Hi!

The tool is amazing, the only problem is that if I select a single word and press CTRL-C to copy, the entire contents of the buffer are copied.

If I select a word and use the context menu with the mouse, I can copy only the selection. So it seems to me that the problem is only with CTRL-C.

The behavior is the same with flatpak installation or compiling from source.

Regards,
Marcelo Módolo

Feature: default tool

When i use textpieces i use the same tool in nine times out of ten.

Perhaps one could add a default tool to the preferences and when the application starts up it would have that selected? Not i big issue but it would save the user from always start by selecting a tool.

As an alternative one could just remember the last selected tool and use that when starting up the next time thus eliminating the need for adding UI to preferences.

Tool strings seems untranslated

Hi,

Some tools have a right corner area and they seems untranslated even they have translated strings.

Screenshot

Also when I change between tools, some strings keep adding and adding this area.

find-replace.webm

verbose error output base64

when doing base64 -d, if there is a part of the content wrong, for debugging we need to see the complete output.

echo "TG9yZW0gSXBzdW0gaXMgc2ltcGx5IGR1bW15IHRleHQgb2YgdGhlIHByaW50aW5nIGFuZ
CB0eXBlc2V0dGluZyBpbmR1c3RyeS4gTG9yZW0gSXBzdW0gaGFzIGJlZW4gdGhlIGluZHVzdHJ5
J3Mgc3RhbmRhcmQgZHVtbXkgdGV4dCBldmVyIHNpbmNlIHRoZSAxNTAwcywgd2hlbiBhbiB1bmtu
b3duIHByaW50ZXIgdG9vayBhIGdhbGxleSBvZiB0eXBlIGFuZCBzY3JhbWJsZWQgaXQgdG8gbWFr
ZSBhIHR5cGUgc3BlY2ltZW4gYm9vay4gSXQgaGFzIHN1cnZpdmVkIG5vdCBvbmx5IGZpdmUgY2V
udHVyaWVzLCBidXQgYWxzbyB0aGUgbGVhcCBpbnRvIGVsZWN0cm9uaWMgdHlwZXNldHRpbmc
sIHJlbWFpbmluZyBlc3NlbnRpYWxseSB1bmNoYW5nZWQuIEl0IHdhcyBwb3B1bGFyaXNlZCBpbiB0
aGUgMTk2MHMgd2l0aCB0aGUgcmVsZWFzZSBvZiBMZXRyYXNldCBzaGVldHMgY29udGFpbmluZ
yBMb3JlbSBJcHN1bSBwYXNzYWdlcywgYW5kIG1vcmUgcmVjZW50bHkgd2l0aCBkZXNrdG9wIHB1Y
mxpc2hpbmcgc29mdHdhcmUgbGlrZSBBbGR1cyBQYWdlTWFrZXIgaW5jbHVkaW5nIHZlcnNpb25zIG
9mIExvcmVtIElwc3VtLg1daf.12agh" | base64 -d
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the
 industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type
 and scrambled it to make a type specimen book. It has survived not only five centuries, but also the 
leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with
 the release of Letraset sheets containing Lorem Ipsum passages, and more]ibase64: invalid inputpublishing 
software like Aldus PageMaker including versions of Lorem Ipsum.

image

Default Font

Hi,

thank you for your work. It makes my life better.

Textpieces does not pick my default monospace font from gsettings. /org/gnome/desktop/interface/monospace-font-name
Is that intentional?

I am running version 2.3.3 from Flathub.

Thanks.

Build error on Debian

I am trying a local build . I have all the relevant dependencies installed.
OS: debian testing GCC: 11
I attached the test log below
meson_log.txt
.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.