Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrige chaves de tradução para Pipo Saude #9

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ Vagas de empresas que ativamente contratam pessoas desenvolvedoras Clojure no Br
## Vagas


| Vaga | Empresa | Local | Remoto? | Onde aplicar |
|-------------------------------------------------------------------------------------|--------------|---------------------------------|---------|------------------------------------------------------------------------------------------------------------------------|
| Pessoa Desenvolvedora de Software Backend Sênior (Clojure) | Embraer | São José dos Campos | Sim | https://embraer.gupy.io/jobs/1108893?jobBoardSource=gupy_public_page |
| Full Stack Developer | Flow Finance | | Sim | https://airtable.com/embed/shrG8DnjAdAOAZm9h/tble1ghQMefhblMVK/viwOzu3raZSmdxK7Z/recGtRyuHlvFhUV0v |
| Business Security Manager | Nubank | São Paulo | Não | https://boards.greenhouse.io/nubank/jobs/3400816 |
| Cloud Security Engineer Specialist | Nubank | São Paulo | Não | https://boards.greenhouse.io/nubank/jobs/3339732 |
| Data Engineer | Nubank | São Paulo | Não | https://boards.greenhouse.io/nubank/jobs/3264442 |
| Mobile Software Engineer | Nubank | São Paulo | Não | https://boards.greenhouse.io/nubank/jobs/1776035 |
| Offensive Security Engineer Specialist | Nubank | São Paulo | Não | https://boards.greenhouse.io/nubank/jobs/3410377 |
| Security Incident Responder SecOps | Nubank | São Paulo | Não | https://boards.greenhouse.io/nubank/jobs/3382061 |
| Software Engineer | Nubank | São Paulo | Não | https://boards.greenhouse.io/nubank/jobs/2569175 |
| Systems Engineer (SRE/DevOps) | Nubank | São Paulo | Não | https://boards.greenhouse.io/nubank/jobs/3372800 |
| Tech Manager | Nubank | São Paulo | Não | https://boards.greenhouse.io/nubank/jobs/2989044 |
| Engenheira de Software (vaga focada em mulheres) | Trabalho Remoto | Pipo Saúde | %LABEL_POSITION_TYPE_WORLDWIDE% | | https://pipo-saude.breezy.hr/p/2508984cb6c6-engenheira-de-software-vaga-focada-em-mulheres-trabalho-remoto |
| Pessoa Engenheira de Software (vaga focada em pessoas negras) | Pipo Saúde | %LABEL_POSITION_TYPE_WORLDWIDE% | | https://pipo-saude.breezy.hr/p/1a9152c5e824-pessoa-engenheira-de-software-vaga-focada-em-pessoas-negras |
| Pessoa Engenheira de Software (vaga focada em pessoas trans) | Trabalho Remoto | Pipo Saúde | %LABEL_POSITION_TYPE_WORLDWIDE% | | https://pipo-saude.breezy.hr/p/647061946892-pessoa-engenheira-de-software-vaga-focada-em-pessoas-trans-trabalho-remoto |
| Pessoa Engenheira de Software Sênior | Pipo Saúde | %LABEL_POSITION_TYPE_WORLDWIDE% | | https://pipo-saude.breezy.hr/p/323a55e4c15f-pessoa-engenheira-de-software-senior |
| Vaga | Empresa | Local | Remoto? | Onde aplicar |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"aplicar" não traduz bem o "apply" do inglês. Pessoalmente eu prefiro "candidatar-se"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Total cara, vou trocar o cabeçalho por "Onde se candidatar", o que você acha?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| Vaga | Empresa | Local | Remoto? | Onde aplicar |
| Vaga | Empresa | Local | Remoto? | Onde se candidatar |

|-------------------------------------------------------------------------------------|--------------|--------------------------|---------|------------------------------------------------------------------------------------------------------------------------|
| Pessoa Desenvolvedora de Software Backend Sênior (Clojure) | Embraer | São José dos Campos | Sim | https://embraer.gupy.io/jobs/1108893?jobBoardSource=gupy_public_page |
| Full Stack Developer | Flow Finance | | Sim | https://airtable.com/embed/shrG8DnjAdAOAZm9h/tble1ghQMefhblMVK/viwOzu3raZSmdxK7Z/recGtRyuHlvFhUV0v |
| Business Security Manager | Nubank | São Paulo | Não | https://boards.greenhouse.io/nubank/jobs/3400816 |
| Cloud Security Engineer Specialist | Nubank | São Paulo | Não | https://boards.greenhouse.io/nubank/jobs/3339732 |
| Data Engineer | Nubank | São Paulo | Não | https://boards.greenhouse.io/nubank/jobs/3264442 |
| Mobile Software Engineer | Nubank | São Paulo | Não | https://boards.greenhouse.io/nubank/jobs/1776035 |
| Offensive Security Engineer Specialist | Nubank | São Paulo | Não | https://boards.greenhouse.io/nubank/jobs/3410377 |
| Security Incident Responder SecOps | Nubank | São Paulo | Não | https://boards.greenhouse.io/nubank/jobs/3382061 |
| Software Engineer | Nubank | São Paulo | Não | https://boards.greenhouse.io/nubank/jobs/2569175 |
| Systems Engineer (SRE/DevOps) | Nubank | São Paulo | Não | https://boards.greenhouse.io/nubank/jobs/3372800 |
| Tech Manager | Nubank | São Paulo | Não | https://boards.greenhouse.io/nubank/jobs/2989044 |
| Engenheira de Software (vaga focada em mulheres) | Trabalho Remoto | Pipo Saúde | Remoto ao redor do mundo | Sim | https://pipo-saude.breezy.hr/p/2508984cb6c6-engenheira-de-software-vaga-focada-em-mulheres-trabalho-remoto |
| Pessoa Engenheira de Software (vaga focada em pessoas negras) | Pipo Saúde | Remoto ao redor do mundo | Sim | https://pipo-saude.breezy.hr/p/1a9152c5e824-pessoa-engenheira-de-software-vaga-focada-em-pessoas-negras |
| Pessoa Engenheira de Software (vaga focada em pessoas trans) | Trabalho Remoto | Pipo Saúde | Remoto ao redor do mundo | Sim | https://pipo-saude.breezy.hr/p/647061946892-pessoa-engenheira-de-software-vaga-focada-em-pessoas-trans-trabalho-remoto |
| Pessoa Engenheira de Software Sênior | Pipo Saúde | Remoto ao redor do mundo | Sim | https://pipo-saude.breezy.hr/p/323a55e4c15f-pessoa-engenheira-de-software-senior |


## Empresas que usam Clojure sem vagas no momento ou sem listagem pública
Expand Down
4 changes: 3 additions & 1 deletion deps.edn
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{:deps
{org.clojure/clojure {:mvn/version "1.10.1"}
enlive/enlive {:mvn/version "1.1.6"}
selmer/selmer {:mvn/version "1.12.31"}}}
selmer/selmer {:mvn/version "1.12.31"}
org.mozilla/rhino {:mvn/version "1.7.13"}
clj-http/clj-http {:mvn/version "3.12.3"}}}
2 changes: 1 addition & 1 deletion scraped-jobs.edn
Original file line number Diff line number Diff line change
@@ -1 +1 @@
({:title "Pessoa Desenvolvedora de Software Backend Sênior (Clojure)", :url "https://embraer.gupy.io/jobs/1108893?jobBoardSource=gupy_public_page", :location "São José dos Campos", :department "Inovação", :remote true, :type "Talent pool", :name "Embraer"} {:title "Full Stack Developer", :url "https://airtable.com/embed/shrG8DnjAdAOAZm9h/tble1ghQMefhblMVK/viwOzu3raZSmdxK7Z/recGtRyuHlvFhUV0v", :location nil, :department "Engineering", :remote true, :name "Flow Finance"} {:title "Business Security Manager", :url "https://boards.greenhouse.io/nubank/jobs/3400816", :location "São Paulo", :department "60350", :office_id "58102", :remote false, :name "Nubank"} {:title "Cloud Security Engineer Specialist", :url "https://boards.greenhouse.io/nubank/jobs/3339732", :location "São Paulo", :department "60350", :office_id "58102", :remote false, :name "Nubank"} {:title "Data Engineer", :url "https://boards.greenhouse.io/nubank/jobs/3264442", :location "São Paulo", :department "60350", :office_id "58102", :remote false, :name "Nubank"} {:title "Mobile Software Engineer ", :url "https://boards.greenhouse.io/nubank/jobs/1776035", :location "São Paulo", :department "60350", :office_id "58102", :remote false, :name "Nubank"} {:title "Offensive Security Engineer Specialist", :url "https://boards.greenhouse.io/nubank/jobs/3410377", :location "São Paulo", :department "60350", :office_id "58102", :remote false, :name "Nubank"} {:title "Security Incident Responder SecOps", :url "https://boards.greenhouse.io/nubank/jobs/3382061", :location "São Paulo", :department "60350", :office_id "58102", :remote false, :name "Nubank"} {:title "Software Engineer", :url "https://boards.greenhouse.io/nubank/jobs/2569175", :location "São Paulo", :department "60350", :office_id "58102", :remote false, :name "Nubank"} {:title "Systems Engineer (SRE/DevOps)", :url "https://boards.greenhouse.io/nubank/jobs/3372800", :location "São Paulo", :department "60350", :office_id "58102", :remote false, :name "Nubank"} {:title "Tech Manager", :url "https://boards.greenhouse.io/nubank/jobs/2989044", :location "São Paulo", :department "60350", :office_id "58102", :remote false, :name "Nubank"} {:title "Engenheira de Software (vaga focada em mulheres) | Trabalho Remoto", :url "https://pipo-saude.breezy.hr/p/2508984cb6c6-engenheira-de-software-vaga-focada-em-mulheres-trabalho-remoto", :location "%LABEL_POSITION_TYPE_WORLDWIDE%", :department "Engenharia", :type "%LABEL_POSITION_TYPE_FULL_TIME%", :name "Pipo Saúde"} {:title "Pessoa Engenheira de Software (vaga focada em pessoas negras)", :url "https://pipo-saude.breezy.hr/p/1a9152c5e824-pessoa-engenheira-de-software-vaga-focada-em-pessoas-negras", :location "%LABEL_POSITION_TYPE_WORLDWIDE%", :department "Engenharia", :type "%LABEL_POSITION_TYPE_FULL_TIME%", :name "Pipo Saúde"} {:title "Pessoa Engenheira de Software (vaga focada em pessoas trans) | Trabalho Remoto", :url "https://pipo-saude.breezy.hr/p/647061946892-pessoa-engenheira-de-software-vaga-focada-em-pessoas-trans-trabalho-remoto", :location "%LABEL_POSITION_TYPE_WORLDWIDE%", :department "Engenharia", :type "%LABEL_POSITION_TYPE_FULL_TIME%", :name "Pipo Saúde"} {:title "Pessoa Engenheira de Software Sênior", :url "https://pipo-saude.breezy.hr/p/323a55e4c15f-pessoa-engenheira-de-software-senior", :location "%LABEL_POSITION_TYPE_WORLDWIDE%", :department "Engenharia", :type "%LABEL_POSITION_TYPE_FULL_TIME%", :name "Pipo Saúde"})
({:title "Pessoa Desenvolvedora de Software Backend Sênior (Clojure)", :url "https://embraer.gupy.io/jobs/1108893?jobBoardSource=gupy_public_page", :location "São José dos Campos", :department "Inovação", :remote true, :type "Talent pool", :name "Embraer"} {:title "Full Stack Developer", :url "https://airtable.com/embed/shrG8DnjAdAOAZm9h/tble1ghQMefhblMVK/viwOzu3raZSmdxK7Z/recGtRyuHlvFhUV0v", :location nil, :department "Engineering", :remote true, :name "Flow Finance"} {:title "Business Security Manager", :url "https://boards.greenhouse.io/nubank/jobs/3400816", :location "São Paulo", :department "60350", :office_id "58102", :remote false, :name "Nubank"} {:title "Cloud Security Engineer Specialist", :url "https://boards.greenhouse.io/nubank/jobs/3339732", :location "São Paulo", :department "60350", :office_id "58102", :remote false, :name "Nubank"} {:title "Data Engineer", :url "https://boards.greenhouse.io/nubank/jobs/3264442", :location "São Paulo", :department "60350", :office_id "58102", :remote false, :name "Nubank"} {:title "Mobile Software Engineer ", :url "https://boards.greenhouse.io/nubank/jobs/1776035", :location "São Paulo", :department "60350", :office_id "58102", :remote false, :name "Nubank"} {:title "Offensive Security Engineer Specialist", :url "https://boards.greenhouse.io/nubank/jobs/3410377", :location "São Paulo", :department "60350", :office_id "58102", :remote false, :name "Nubank"} {:title "Security Incident Responder SecOps", :url "https://boards.greenhouse.io/nubank/jobs/3382061", :location "São Paulo", :department "60350", :office_id "58102", :remote false, :name "Nubank"} {:title "Software Engineer", :url "https://boards.greenhouse.io/nubank/jobs/2569175", :location "São Paulo", :department "60350", :office_id "58102", :remote false, :name "Nubank"} {:title "Systems Engineer (SRE/DevOps)", :url "https://boards.greenhouse.io/nubank/jobs/3372800", :location "São Paulo", :department "60350", :office_id "58102", :remote false, :name "Nubank"} {:title "Tech Manager", :url "https://boards.greenhouse.io/nubank/jobs/2989044", :location "São Paulo", :department "60350", :office_id "58102", :remote false, :name "Nubank"} {:title "Engenheira de Software (vaga focada em mulheres) | Trabalho Remoto", :url "https://pipo-saude.breezy.hr/p/2508984cb6c6-engenheira-de-software-vaga-focada-em-mulheres-trabalho-remoto", :location "Remoto ao redor do mundo", :department "Engenharia", :type "%LABEL_POSITION_TYPE_FULL_TIME%", :remote true, :name "Pipo Saúde"} {:title "Pessoa Engenheira de Software (vaga focada em pessoas negras)", :url "https://pipo-saude.breezy.hr/p/1a9152c5e824-pessoa-engenheira-de-software-vaga-focada-em-pessoas-negras", :location "Remoto ao redor do mundo", :department "Engenharia", :type "%LABEL_POSITION_TYPE_FULL_TIME%", :remote true, :name "Pipo Saúde"} {:title "Pessoa Engenheira de Software (vaga focada em pessoas trans) | Trabalho Remoto", :url "https://pipo-saude.breezy.hr/p/647061946892-pessoa-engenheira-de-software-vaga-focada-em-pessoas-trans-trabalho-remoto", :location "Remoto ao redor do mundo", :department "Engenharia", :type "%LABEL_POSITION_TYPE_FULL_TIME%", :remote true, :name "Pipo Saúde"} {:title "Pessoa Engenheira de Software Sênior", :url "https://pipo-saude.breezy.hr/p/323a55e4c15f-pessoa-engenheira-de-software-senior", :location "Remoto ao redor do mundo", :department "Engenharia", :type "%LABEL_POSITION_TYPE_FULL_TIME%", :remote true, :name "Pipo Saúde"})
15 changes: 12 additions & 3 deletions src/clojure_empregos_brasil/boards.clj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
(ns clojure-empregos-brasil.boards
(:require [net.cgrand.enlive-html :as html]
[clojure-empregos-brasil.scrap :as scrap]))
[clojure-empregos-brasil.scrap :as scrap]
[clojure-empregos-brasil.breezy :as breezy]))

(def gupy
{:title [:.title html/text-node]
Expand All @@ -21,6 +22,14 @@
(def breezy
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

creio que esse breezy aqui tá dando um "shadow" no require, não? De qualquer forma, é ambíguo.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concordo, vou pensar numa boa alternativa.

{:title [:h2 html/text-node]
:url #(-> % (html/select [:a]) first :attrs :href)
:location [:ul.meta :li.location html/text-node]
:location #(-> %
(html/select [:ul.meta :li.location html/text-node])
first
breezy/i18n)
:department [:ul.meta :li.department html/text-node]
:type [:ul.meta :li.type html/text-node]})
:type [:ul.meta :li.type html/text-node]
:remote #(-> %
(html/select [:ul.meta :li.location html/text-node])
(->> first (contains? #{"%LABEL_POSITION_TYPE_REMOTE%"
"%LABEL_POSITION_TYPE_Worldwide%"
"%LABEL_POSITION_TYPE_WORLDWIDE%"})))})
89 changes: 89 additions & 0 deletions src/clojure_empregos_brasil/breezy.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
(ns clojure-empregos-brasil.breezy
(:require [net.cgrand.enlive-html :as html]
[clj-http.client :as http])
(:import [org.mozilla.javascript CompilerEnvirons Context Parser Token]
[org.mozilla.javascript.ast NodeVisitor]))

(def ^:private i18n-map (atom nil))

(defn- parse-js
[source uri]
(let [env (new CompilerEnvirons)]
(.setLanguageVersion env Context/VERSION_ES6)

(-> (Parser. env)
(.parse source uri 0))))

(defn- translation-var?
[node]
(let [node (.getTarget node)]
(and (= (.getType node) Token/NAME)
(= (.getIdentifier node) "TRANSLATIONS"))))

(defn- make-visitor
[target]
(reify NodeVisitor
(visit [this node]
(if (= (.getType node) Token/VAR)
(do
(when-let [node (first (filter translation-var? (.getVariables node)))]
(reset! target (.getInitializer node)))
false)
true))))

(defn- find-translation-node
[ast]
(let [translation-node (atom nil)
visitor (make-visitor translation-node)]
(.visitAll ast visitor)
@translation-node))

(defn- node->str
[node]
(let [type (.getType node)]
(cond
(= type Token/NAME) (.getIdentifier node)
(= type Token/STRING) (.getValue node)
(= type Token/NUMBER) (.getValue node)
:else nil)))

(def object-literal->hashmap)

(defn- element->pair
[element]
(let [left (.getLeft element)
right (.getRight element)]
[(node->str left) (if (= (.getType right) Token/OBJECTLIT)
(object-literal->hashmap right)
(node->str right))]))

(defn- object-literal->hashmap
[literal]
(if (not= (.getType literal) Token/OBJECTLIT)
nil
(into {} (map element->pair (.getElements literal)))))

(defn- translate-script-src
[page]
(-> page (html/select [:#translateScript]) first :attrs :src))

(defn- fetch-script
[url]
(-> url http/get :body))

(defn load-i18n
[page]
(let [translate-script (translate-script-src page)]
(reset! i18n-map
(-> translate-script
fetch-script
(parse-js translate-script)
find-translation-node
object-literal->hashmap
(get "pt-br")))))


(defn i18n
[key]
(get @i18n-map key key))

Loading