Skip to content

Commit

Permalink
Create utp module
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmytro Galushko committed Apr 8, 2024
1 parent 3942930 commit 5c42565
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
8 changes: 5 additions & 3 deletions config/examples/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

apt-get update
apt-get upgrade -f -y
apt-get install -f -y docker docker.io docker-compose vim screen
mkdir -p /home/dima/workdir
chomd 777 -R /home/dima/workdir
apt-get install -f -y docker docker.io docker-compose
mkdir -p ~/workdir && chomd 777 -R ~/workdir && cd ~/workdir

wget https://raw.githubusercontent.com/halushko/kino-cat/master/config/dockerfiles/Dockerfile-bot

echo "UUID=779DB7ED03DED64A /home/dima/workdir ntfs defaults 0 0" >> /etc/fstab
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protected String getProgressBar(TorrentEntity torrent) {
StringBuilder line = new StringBuilder();

IntStream.range(0, blackBlocks).mapToObj(i -> "█").forEach(line::append);
if(blackBlocks < blocks) {
if (blackBlocks < blocks) {
line.append("▒");
}
if (blackBlocks + 1 < blocks) {
Expand All @@ -47,7 +47,7 @@ protected String getProgressBar(TorrentEntity torrent) {
protected String getGigabytesLeft(TorrentEntity torrent) {
return torrent.getPercentDone() == 1.0
? " (заверш)"
: " % (" + Math.round((torrent.getTotalSize() - (long) (torrent.getTotalSize() * torrent.getPercentDone())) / 1000000.0) / 1000.0 + " Gb залиш)";
: " (" + Math.round((torrent.getTotalSize() - (long) (torrent.getTotalSize() * torrent.getPercentDone())) / 1000000.0) / 1000.0 + " Gb залиш)";
}

protected String getStatusIcon(TorrentEntity torrent) {
Expand Down
17 changes: 17 additions & 0 deletions utp/src/main/java/com/halushko/kinocat/utp/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.halushko.kinocat.utp;

//TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or
// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
public class Main {
public static void main(String[] args) {
//TIP Press <shortcut actionId="ShowIntentionActions"/> with your caret at the highlighted text
// to see how IntelliJ IDEA suggests fixing it.
System.out.printf("Hello and welcome!");

for (int i = 1; i <= 5; i++) {
//TIP Press <shortcut actionId="Debug"/> to start debugging your code. We have set one <icon src="AllIcons.Debugger.Db_set_breakpoint"/> breakpoint
// for you, but you can always add more by pressing <shortcut actionId="ToggleLineBreakpoint"/>.
System.out.println("i = " + i);
}
}
}

0 comments on commit 5c42565

Please sign in to comment.